<extend name="Public/publicHTML"/>
<block name="nav">
    <link rel="stylesheet"  href="__COMMON__/bootstrap/css/bootstrap.min.css"/>
    <script src="__COMMON__/bootstrap/js/bootstrap.min.js"></script>
    <br/>
</block>
<block name="content">
    <section class="content">
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i>快递公司列表</h3>
        </div>
        <div class="panel-body">
          <div class="navbar navbar-default">
              <form action="{:U('express')}" id="search" class="navbar-form form-inline" method="get">
                <div class="form-group">
                  <label class="control-label" for="input-order-id">关键词</label>
                  <div class="input-group">
                    <input type="text" name="{$expressModel::$name_d}" value="{$_GET[$expressModel::$name_d]}" placeholder="搜索词" id="input-order-id" class="form-control">
                  </div>
                </div>                  
                <!--排序规则-->
                <button type="submit" id="button-filter search-order"  onclick="javascript:$('#search').submit();" class="btn btn-primary"><i class="fa fa-search"></i> 筛选</button>
                <button type="button" onclick="location.href='{:U('addFreightHTML')}'" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加快递列表</button>
              </form>
          </div>
                    <div id="ajax_return">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th class="sorting text-left">ID</th>
                                    <th class="sorting text-left">快递公司名称</th>
                                    <th class="sorting text-left">快递公司编码</th>
                                    <th class="sorting text-left">快递公司url</th>
                                    <th class="sorting text-left">是否启用</th>
                                    <th class="sorting text-left">是否常用</th>
                                    <th class="sorting text-left">是否支持服务站配送</th>
                                </tr>
                                </thead>
                                <tbody>
                                	<if condition="!empty($data['data'])">
		                                <foreach name="data['data']" item="row">
		                                    <tr>
		                                        <td class="text-left">{$row[$expressModel::$id_d]}</td>
		                                        <td class="text-left">{$row[$expressModel::$name_d]}</td>
		                                        <td class="text-left">{$row[$expressModel::$code_d]}</td>
		                                        <td class="text-left">{$row[$expressModel::$url_d]}</td>
		                                         <td class="text-left shelves-one">
	                                            <if condition="$row[$expressModel::$status_d] eq 1">
	                                               <img src="__COMMON__/img/yes.png"  onclick="ExpressWQ.isCommon('{:U('isCommon')}',
	                                               			{$row[$expressModel::$id_d]},
                                               		{$row[$expressModel::$status_d]}, '{$expressModel::$status_d}')" class="cursor" data-flag="true"/>
	                                                <else/>
	                                                <img src="__COMMON__/img/cancel.png" onclick="ExpressWQ.isCommon('{:U('isCommon')}',
	                                                	{$row[$expressModel::$id_d]},
	                                                	{$row[$expressModel::$status_d]},'{$expressModel::$status_d}'
	                                                	)"  class="cursor"  data-flag="false"/>
	                                            </if></td>
	                                        <td class="text-left  shelves-two">
	                                            <if condition="$row[$expressModel::$order_d] == 1">
	                                                <img src="__COMMON__/img/yes.png" onclick="ExpressWQ.isCommon('{:U('isCommon')}', 
	                                                	{$row[$expressModel::$id_d]},
	                                                	{$row[$expressModel::$order_d]},'{$expressModel::$order_d}'
	                                                	)"  class="cursor" data-flag="true"/>
	                                                <else/>
	                                                <img src="__COMMON__/img/cancel.png"   onclick="ExpressWQ.isCommon('{:U('isCommon')}', 
	                                                {$row[$expressModel::$id_d]},
                                                	{$row[$expressModel::$order_d]}, '{$expressModel::$order_d}')"  class="cursor" data-flag="false"/>
	                                            </if>
	                                        </td>
	                                         <td class="text-left  shelves-two">
	                                            <if condition="$row[$expressModel::$ztState_d] == 1">是 <else/>否</if>
	                                        </td>
		                                    </tr>
		                                </foreach>
	                                </if>
                                </tbody>
                            </table>
                            <div class="page">{$data['page']}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
  <script src="__COMMON__/js/alert.js"></script>
   <script src="__JS__/express/express.js"></script>
</block>